<navigation xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    app:startDestination="@id/welcomeFragment">

    <fragment
        android:id="@id/welcomeFragment"
        android:name="com.example.messengerapp.ui.WelcomeFragment"
        tools:layout="@layout/fragment_welcome">
        <action
            android:id="@id/action_welcomeFragment_to_loginFragment"
            app:destination="@id/loginFragment" />
    </fragment>

    <fragment
        android:id="@id/loginFragment"
        android:name="com.example.messengerapp.ui.LoginFragment"
        tools:layout="@layout/fragment_login">
        <action
            android:id="@id/action_loginFragment_to_registerFragment"
            app:destination="@id/registerFragment" />
        <action
            android:id="@id/action_loginFragment_to_forgotPasswordFragment"
            app:destination="@id/forgotPasswordFragment" />
        <action
            android:id="@id/action_loginFragment_to_chatListFragment"
            app:destination="@id/chatListFragment" />
    </fragment>

    <fragment
        android:id="@id/registerFragment"
        android:name="com.example.messengerapp.ui.RegisterFragment"
        tools:layout="@layout/fragment_register">
        <action
            android:id="@id/action_registerFragment_to_loginFragment"
            app:destination="@id/loginFragment" />
    </fragment>

    <fragment
        android:id="@id/forgotPasswordFragment"
        android:name="com.example.messengerapp.ui.ForgotPasswordFragment"
        tools:layout="@layout/fragment_forgot_password">
        <action
            android:id="@id/action_forgotPasswordFragment_to_loginFragment"
            app:destination="@id/loginFragment" />
    </fragment>

    <fragment
        android:id="@id/chatFragment"
        android:name="com.example.messengerapp.ui.ChatFragment"
        tools:layout="@layout/fragment_chat">
        <action
            android:id="@id/action_chatFragment_to_profileFragment"
            app:destination="@id/profileFragment" />
        <action
            android:id="@id/action_chatFragment_to_fullScreenImageFragment"
            app:destination="@id/fullScreenImageFragment" />
    </fragment>

    <fragment
        android:id="@id/chatListFragment"
        android:name="com.example.messengerapp.ui.ChatListFragment"
        tools:layout="@layout/fragment_chat_list">
        <action
            android:id="@id/action_chatListFragment_to_chatFragment"
            app:destination="@id/chatFragment" />
    </fragment>

    <fragment
        android:id="@id/profileFragment"
        android:name="com.example.messengerapp.ui.ProfileFragment"
        tools:layout="@layout/fragment_profile" />

    <fragment
        android:id="@id/editProfileFragment"
        android:name="com.example.messengerapp.ui.EditProfileFragment"
        tools:layout="@layout/fragment_edit_profile" />

    <fragment
        android:id="@id/fullScreenImageFragment"
        android:name="com.example.messengerapp.ui.FullScreenImageFragment"
        tools:layout="@layout/fragment_full_screen_image" />

    <action
        android:id="@id/action_global_editProfileFragment"
        app:destination="@id/editProfileFragment" />

    <action
        android:id="@id/action_global_chatFragment"
        app:destination="@id/chatFragment" />
</navigation>
